<template>
  <div>
    <el-card class="cardBox">
      <div class="title"> 
        <h1 class="">空压机</h1>
        <!-- <el-button @click="alarmBtn">报警总数：0</el-button> -->
      </div>
      <!-- SVG 图标 -->
      <!--    <img class="svg_style" ref="svgRef" :src="EarthIcon" />-->
      <!-- 参数表格 -->
      <!-- 第一套 -->
      <div style="border: 1px solid var(--el-border-color-light)">
        <el-row class="header-row">
          <el-col :span="8"></el-col>
          <el-col :span="8" class="title-col"
            ><span>大墩沟智能压风监控系统</span></el-col
          >
          <el-col :span="8" class="status-col">
            <div class="status-container">
              <div>
                <span>通讯故障</span>
                <i class="yuan yellow"></i>
              </div>
              <div>
                <span>无故障</span>
                <i class="yuan grey"></i>
              </div>
              <div>
                <span>运行</span>
                <i class="yuan green"></i>
              </div>
              <div>
                <span>报警</span>
                <i class="yuan red"></i>
              </div>
            </div>
          </el-col>
        </el-row>
        <!-- 标题 -->
        <el-row class="threeTitle">
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          ></el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >电压</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >电流</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >排气压力</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >排气温度</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >气罐压力</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >主机温度</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >输出频率</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >油滤时间</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >油分时间</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >电源</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >运行</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >加载</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >故障</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >单机状态</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >手动启停</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >单机状态</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >预警状态</el-col
          >
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%"
            >故障状态</el-col
          >
        </el-row>

        <!-- 1# -->
        <el-row>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >1#空压机</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan2", operator.NO, null, 2) }}
            </span>
            V
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan3", operator.NO, null, 2) }}
            </span>
            A
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan4", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan5", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan6", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan7", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan8", operator.NO, null, 2) }}
            </span>
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan9", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan10", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus2', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus3', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus4', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus5', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus6', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus7', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus8', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus9', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
        </el-row>

        <!-- 2# -->
        <el-row>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >2#空压机</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan2", operator.NO, null, 2) }}
            </span>
            V
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan3", operator.NO, null, 2) }}
            </span>
            A
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan4", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan5", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan6", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan7", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan8", operator.NO, null, 2) }}
            </span>
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan9", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan10", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus2', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus3', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus4', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus5', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus6', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus7', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus8', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus9', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
        </el-row>

        <!-- 3# -->
        <el-row>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >3#空压机</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan2", operator.NO, null, 2) }}
            </span>
            V
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan3", operator.NO, null, 2) }}
            </span>
            A
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan4", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan5", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan6", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan7", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan8", operator.NO, null, 2) }}
            </span>
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan9", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan10", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus2', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus3', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus4', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus5', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus6', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus7', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus8', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus9', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
        </el-row>

        <!-- 4# -->
        <el-row>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
            >4#空压机</el-col
          >
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan2", operator.NO, null, 2) }}
            </span>
            V
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan3", operator.NO, null, 2) }}
            </span>
            A
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan4", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan5", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan6", operator.NO, null, 2) }}
            </span>
            Mpa
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan7", operator.NO, null, 2) }}
            </span>
            ℃
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan8", operator.NO, null, 2) }}
            </span>
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan9", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col
            class="flex-center"
            style="flex: 0 0 6.895%; max-width: 6.895%"
          >
            <span class="readNumber">
              {{ NamePD_42("numberziduan10", operator.NO, null, 2) }}
            </span>
            H
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus2', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus3', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus4', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus5', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus6', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus7', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus8', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
          <el-col class="flex-center" style="flex: 0 0 3.45%; max-width: 3.45%">
            <span class="hn-span">
              <div
                class="indicator-light"
                :class="
                  NamePD_42('ziduanstatus9', operator.NO).value === 2
                    ? 'red'
                    : 'grey'
                "
              ></div>
            </span>
          </el-col>
        </el-row>
      </div>

      <!-- 其他 -->
      <div>
        <div style="">
          <el-row>
            <el-col :span="12"> 主管流量 </el-col>
            <el-col :span="12">
              <span class="readNumber">
                {{ NamePD_42("numberziduan111", operator.NO, null, 2) }}
              </span>
              Mpa
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12"> 主管压力 </el-col>
            <el-col :span="12">
              <span class="readNumber">
                {{ NamePD_42("numberziduan111", operator.NO, null, 2) }}
              </span>
              m³/H
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12"> 手动模式 </el-col>
            <el-col :span="12">
              <span class="hn-span">
                <div
                  class="indicator-light"
                  :class="
                    NamePD_42('ziduanstatus111', operator.NO).value === 2
                      ? 'red'
                      : 'grey'
                  "
                ></div>
              </span>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12"> 联控模式 </el-col>
            <el-col :span="12">
              <span class="hn-span">
                <div
                  class="indicator-light"
                  :class="
                    NamePD_42('ziduanstatus111', operator.NO).value === 2
                      ? 'red'
                      : 'grey'
                  "
                ></div>
              </span>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12"> 联控启动 </el-col>
            <el-col :span="12">
              <span class="hn-span">
                <div
                  class="indicator-light"
                  :class="
                    NamePD_42('ziduanstatus111', operator.NO).value === 2
                      ? 'red'
                      : 'grey'
                  "
                ></div>
              </span>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12"> 联控停止 </el-col>
            <el-col :span="12">
              <span class="hn-span">
                <div
                  class="indicator-light"
                  :class="
                    NamePD_42('ziduanstatus111', operator.NO).value === 2
                      ? 'red'
                      : 'grey'
                  "
                ></div>
              </span>
            </el-col>
          </el-row>
        </div>
      </div>

      <!-- <div style="display: flex; justify-content: end; margin-top: 20px">
        <el-button @click="faultResetBtn">故障复位</el-button>
        <el-button @click="sensorBtn">4-2大巷Ⅰ部皮带传感器参数</el-button>
        <el-button @click="switchBtn">4-2大巷Ⅰ部组合开关</el-button>
      </div>

      <div style="margin-top: 50px">
        <span>摄像头</span>
        <span
          >皮带速度
          {{ NamePD_42_GEN("BeltSpeed_AI", operator.Divide, 1000, 2) }}
          m/s</span
        >
      </div>

      <div style="">
        <img
          src="@/assets/images/belt1.png"
          style="width: 100%; height: 250px"
        />
      </div>-->
    </el-card>

    <!-- 公司log -->
    <el-row>
      <div class="kx-log-box">
        <img
          class="kx-img"
          src="@/assets/images/kxauto.png"
          alt="描述图片的文字"
        />
        <span>开轩自动化</span>

        <span class="kx-hezuo">
          商务合作：18509234888（同微信） 技术支持：18691805301（同微信）
        </span>
      </div>
    </el-row>

    <!-- 弹窗 -->
    <form-dialog ref="formRef" />
    <sensorFormDialog ref="sensorRef" />
    <CoalCutterHeadSwitch ref="coalCutterHeadSwitchRef" />
  </div>
</template>

<script setup lang="ts">
import { onMounted, ref, computed } from "vue";
import EarthIcon from "@/assets/images/top.svg";
import { ElMessage } from "element-plus";
import { act, createWebSocket } from "@/utils/websocket"; //引入websocket
import { operator } from "@/utils/op_enums";
import {
  NamePD_42,
  NamePD_42_PT_42,
  NamePD_42_GEN,
} from "@/utils/beltPositioningMethod.ts";
import { BPQMap } from "@/utils/BPQMap";

import formDialog from "./alarmForm.vue";
import sensorFormDialog from "./sensorForm.vue";
import CoalCutterHeadSwitch from "./coalCutterHeadSwitch.vue";
// svg 元素引用
const svgRef = ref<InstanceType<typeof EarthIcon>>();
const formRef = ref();
const sensorRef = ref();
const coalCutterHeadSwitchRef = ref();
const HUANINGBH = [
  "PT42Lock1ReleaseSts_DI",
  "PT42Lock2ReleaseSts_DI",
  "PT42Lock38ReleaseSts_DI",
  "PT42Lock4ReleaseSts_DI",
  "PT42Lock5ReleaseSts_DI",
  "PT42Lock6ReleaseSts_DI",
  "PT42Lock7ReleaseSts_DI",
  "PT42Lock8ReleaseSts_DI",
  "PT42Lock9ReleaseSts_DI",
  "PT42Lock10ReleaseSts_DI",
  "PT42Lock11ReleaseSts_DI",
  "PT42Lock12ReleaseSts_DI",
  "PT42Lock13ReleaseSts_DI",
  "PT42Lock14ReleaseSts_DI",
  "PT42Lock15ReleaseSts_DI",
  "PT42Lock16ReleaseSts_DI",
  "PT42Lock17ReleaseSts_DI",
  "PT42Lock18ReleaseSts_DI",
  "PT42Lock19ReleaseSts_DI",
  "PT42Lock20ReleaseSts_DI",
  "PT42Lock21ReleaseSts_DI",
  "PT42Lock22ReleaseSts_DI",
  "PT42Lock23ReleaseSts_DI",
  "PT42Lock24ReleaseSts_DI",
  "PT42Lock25ReleaseSts_DI",
  "PT42Lock26ReleaseSts_DI",
  "PT42Lock27ReleaseSts_DI",
  "PT42Lock28ReleaseSts_DI",
  "PT42Lock29ReleaseSts_DI",
  "PT42Lock3ReleaseSts_DI",
  "PT42Lock30ReleaseSts_DI",
  "PT42Lock31ReleaseSts_DI",
  "PT42Lock32ReleaseSts_DI",
  "PT42Lock33ReleaseSts_DI",
  "PT42Lock34ReleaseSts_DI",
  "PT42Lock35ReleaseSts_DI",
  "PT42Lock36ReleaseSts_DI",
  "PT42Lock37ReleaseSts_DI",
];

// const NamePD_42 = (
//   key: string,
//   op: operator,
//   op_number?: number,
//   retain?: number
// ) =>
//   computed(() => {
//     return useTagResults(act.PD_42.PD_42[key], op, op_number, retain);
//   });
// const NamePD_42_PT_42 = (
//   key: string,
//   op: operator,
//   op_number?: number,
//   retain?: number
// ) =>
//   computed(() => {
//     return useTagResults(act.PD_42.PD_42_PT_42[key], op, op_number, retain);
//   });
// const NamePD_42_GEN = (
//   key: string,
//   op: operator,
//   op_number?: number,
//   retain?: number
// ) =>
//   computed(() => {
//     return useTagResults(act.PD_42.PD_42_GEN[key], op, op_number, retain);
//   });

onMounted(() => {
  createWebSocket("%PD_42%");
});
const alarmBtn = () => {
  formRef.value.openDialog();
};
const sensorBtn = () => {
  sensorRef.value.openDialog();
};
const switchBtn = () => {
  coalCutterHeadSwitchRef.value.openDialog();
};
const faultResetBtn = () => {
  ElMessage.info("故障复位");
};
</script>

<style lang="scss" scoped>
.cardBox {
  background-color: var(--el-bg-color);
  border-radius: 8px;
  box-shadow: var(--el-box-shadow-light);
  border: 1px solid var(--el-border-color-light);

  /* 左上方标题 */
  .title {
    border-bottom: 1px solid var(--el-border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    h1 {
      color: var(--el-text-color-primary);
      font-size: 20px;
      margin: 0;
      font-weight: 500;
    }

    .el-button {
      background-color: var(--el-color-danger);
      color: var(--el-color-white);
      border: none;
      border-radius: 4px;
      padding: 8px 15px;
      font-weight: 500;

      &:hover {
        background-color: var(--el-color-danger-light-3);
      }
    }
  }

  /* 表格标题 + 四个指示灯 */
  .header-row {
    display: flex;
    align-items: center;
    background-color: var(--el-fill-color-lighter);
    font-weight: 500;
    color: var(--el-text-color-primary);
    padding: 10px;
    .el-col {
      height: 40px;
      display: flex;
      align-items: center;
      border: 1px solid transparent;
    }

    .title-col {
      justify-content: center;

      span {
        font-size: 18px;
      }
    }

    .status-col {
      justify-content: end;
      .status-container {
        display: flex;
        gap: 14px;

        div {
          background: var(--el-fill-color-blank);
          border: 1px solid var(--el-border-color-lighter);
          border-radius: 4px;
          padding: 4px 8px;
          display: flex;
          align-items: center;
          gap: 6px;
          font-size: 13px;

          span {
            padding: 0 4px;
          }

          .yuan {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
            @extend %status-colors;
          }
        }
      }
    }
  }

  /* 表格的标题 项目 + 状态值 */
  .threeTitle {
    .el-col {
      background-color: var(--el-fill-color) !important;
    }
  }

  /* 每一小格子的边框 背景色 */
  .el-col {
    border: 1px solid var(--el-border-color-lighter);
    text-align: center;
    padding: 6px 5px;
    font-size: 13px;
    color: var(--el-text-color-regular);

    &:first-child {
      font-weight: 500;
      // color: blue;
      color: var(--el-text-color-primary);
      background-color: var(--el-fill-color-lighter);
    }
  }

  /* 子页面设备参数--指示灯 */
  .indicator-light {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--el-border-color);
    margin: 0 auto;
    @extend %status-colors;
  }

  /* 华宁沿线闭锁 */
  .huaning-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--el-text-color-primary);
    font-weight: 500;
  }

  .hn-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    padding: 8px;
    align-items: center;
    background-color: var(--el-fill-color-lighter);
    border-radius: 4px;

    span {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .hn-span {
      display: inline-flex;
      align-items: center;
    }
  }

  .index-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    justify-content: flex-start;
    background-color: var(--el-fill-color-lighter);
    border-radius: 4px;
    min-height: 40px;
    align-items: center;
  }

  .index-circle {
    width: 26px;
    height: 26px;
    background-color: var(--el-border-color);
    border-radius: 50%;
    color: var(--el-text-color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    @extend %status-colors;
  }

  // 定义基础颜色类（只定义一次）
  %status-colors {
    &.green {
      background-color: var(--el-color-success);
    }
    &.red {
      background-color: var(--el-color-danger);
    }
    &.yellow {
      background-color: var(--el-color-warning);
    }
    &.grey {
      background-color: var(--el-border-color-dark); // 比默认边框色更深的灰色
    }
  }
}
</style>
